package com.syh.jn.scm.service.api.supplier.stock.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

public interface StockGoodsLossEnums {

  /**
   * 库存记录来源单据类型
   */
  @AllArgsConstructor
  @Getter
  public enum State {

    //单据状态(-1：未确认 1：已确认)
    CONFIRM(Short.valueOf("1"), "报损单", "来源单据类型"),
    UN_CONFIRM(Short.valueOf("-1"), "报损单", "来源单据类型");

    private Short status;
    private String statusName;
    private String statusBelong;

    @Override
    public String toString() {
      return this.status.toString();
    }

    public static State valueOf(Short status) {
      switch (status) {
        case 1:
          return CONFIRM;
        case -1:
          return UN_CONFIRM;
      }
      return null;
    }
  }
}
